﻿Imports SharedCode.PublicEnums
Imports System.Data
Imports System.Data.SqlClient

Public Class SQLServerObjects
    Public Shared Function SQLConnectionString(ByVal ServerName As String, ByVal DatabaseName As String, ByVal AuthenticationMethod As SQL_Authentication_Type, ByVal UserName As String, ByVal Password As String)
        Dim ConnectionString As String
        ConnectionString = "Data Source=" + ServerName + ";Initial Catalog=" + DatabaseName + ";"
        If AuthenticationMethod = SQL_Authentication_Type.SQLAuehentication Then
            ConnectionString += "User Id=" + UserName + ";Password=" + Password + ";"
        Else
            ConnectionString += "Integratioed Security=SSPI"
        End If
        Return ConnectionString
    End Function
    Public Shared Sub SQLRunCommand_NoResultSet(ByRef SQLCommand As SqlCommand, ByVal ConnectionString As String)
        Dim SQLConn As SqlConnection
        SQLConn = New SqlConnection
        SQLConn.ConnectionString = ConnectionString


    End Sub

End Class
